package com.aos.erp.schools.rest.coach;

import com.aos.erp.common.bean.PageBean;
import com.aos.erp.common.bean.ResultEntity;
import com.aos.erp.schools.model.coach.CoachPicture;
import com.aos.erp.schools.service.coach.CoachPictureService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@Slf4j
@RestController("CoachPictureController")
@RequestMapping("/api/coachpicture")
@Api(value="教练照片接口",tags={"教练照片管理"})
public class CoachPictureController {

    @Resource
    private CoachPictureService coachPictureService;

    @GetMapping("/list")
    @ApiOperation(value = "分页查询")
    public ResultEntity<PageBean<CoachPicture>> queryPageBean(@RequestParam(name = "pageIndex", defaultValue = "1") int pageIndex
            , @RequestParam(name = "pageSize", defaultValue = "20") int pageSize) {
        return ResultEntity.success(coachPictureService.queryByPage(pageIndex, pageSize));
    }

}